package A;

/**
 * @Author czl
 * @Date 2024-03-19
 */
public class MainTest {
    public static void main(String[] args) throws InterruptedException {
        SumThread sumThread = new SumThread(1,100);
        SumThread sumThread1 = new SumThread(101,900);
        SumThread sumThread2 = new SumThread(901,1000);


        sumThread.start();
        sumThread1.start();
        sumThread2.start();

        sumThread.join();
        sumThread1.join();
        sumThread2.join();

        long sum = sumThread.getSum()+sumThread1.getSum()+sumThread2.getSum();
        System.out.println(sum);
    }
}
